<?php
namespace php\widgets\editor;
use yii\helpers\Html;

class WebImageWidget extends \yii\base\Widget{
	public $value;
	public $child;
	public $that;
    public $parent_type;

	public function run(){
		$shtml = Html::beginTag('div', [
			'class'=>'WebImageWidget '.(isset($this->value['value']['class']) ? $this->value['value']['class'] : ''),
			'style'=>(isset($this->value['value']['style']) ? $this->value['value']['style'] : ''),
			'id'=>(isset($this->value['value']['class_id']) ? $this->value['value']['class_id'] : ''),
		]);
		$shtml .= isset($this->value['value']['content']) ? Html::img( $this->value['value']['content'] ) : '';
		$shtml .= Html::endTag('div');
		return $shtml;
	}
}